package com.code.day16DuoXian2.not08Predicate;

import java.util.function.Predicate;

public class Test01 {
    public static void main(String[] args) {
        method(new Predicate<String>() {
            @Override
            public boolean test(String s) {
                return s.length()==5;
            }
        },"dddaf");
         method( s -> s.length()==5,"dddaf");
    }
    public static  void method(Predicate< String> predicate,String s){
          boolean b = predicate.test(s);
          System.out.println("b=" +b);
    }
}
